package com.example.servicefeign;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Created by 1 on 2017/8/17. fallback 熔断器  判断程序错误时返回值
 */
@FeignClient(value = "service-hi" ,fallback = FeignServiceHiHystric.class)
public interface FeignServiceHi {
    @RequestMapping(value = "/hi",method = RequestMethod.GET)
    String sayHiToClient(@RequestParam(value = "name") String name);
}
